package vip.george.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import vip.george.bean.animal.Cat;
import vip.george.bean.animal.Dog;

public class App1 {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext1.xml");
        Cat cat = (Cat) applicationContext.getBean("cat");
        System.out.println(cat);

        Dog dog = applicationContext.getBean(Dog.class);
        System.out.println(dog);
    }
}
